/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import entity.Typeb;
import java.util.List;

/**
 *
 * @author linos
 */
public class NewMain3 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        TypebDAO BilletAO=new TypebDAO();
        List<Typeb> lists=BilletAO.findAll();
        BilletAO.beginTransaction();
        for (int i = 0; i < lists.size(); i++) {
            lists.get(i).setStock( lists.get(i).getTypeBillet().getQuantite());
            BilletAO.merge( lists.get(i));
        }
        BilletAO.commit();
        
    }
}
